/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 *
 */

import path from 'path';
import { CompilerOptions, ModuleKind, ScriptTarget } from 'typescript';

import { getHvigorProjectHome } from '../../../cli/wrapper/util.js';

/**
 * hvigorfile.ts及其依赖ts文件的编译配置
 *
 * @since 2022/11/1
 */
export const compilerOptions: CompilerOptions = {
  baseUrl: path.resolve(getHvigorProjectHome(), 'node_modules'),
  target: ScriptTarget.ES2016,
  module: ModuleKind.CommonJS,
  types: [],
  allowJs: true,
  esModuleInterop: true,
  forceConsistentCasingInFileNames: true,
  strict: true,
  skipLibCheck: true,
  noImplicitAny: true,
  noImplicitReturns: true,
  alwaysStrict: true,
  declaration: true,
  noEmit: true,
};
